
#ifndef _HTTP_COMM_H_
#define _HTTP_COMM_H_	1


#include "httpcommon.h"
#include "HttpMsg.h"


//
// CHttpComm class is responsible for communication each nodes, such as client, proxy and web server.
//
class CHttpComm
{
public:
	virtual int	ReqRecv(CReqHttpMsg *reqmsg) = 0;
	virtual int	ResSend(CResHttpMsg *resmsg) = 0;
	virtual int	ReqSend(CReqHttpMsg *reqmsg) = 0;
	virtual int ResRecv(CResHttpMsg *resmsg) = 0;

protected:
	ENGINE_DATA	mEngineData;
};


//
// CNormalHttpComm is responsible for communication between each nodes with normal http protocol.
//
class CNormalHttpComm : public CHttpComm
{
public:
	CNormalHttpComm() {}
	CNormalHttpComm(ENGINE_DATA *ed);
	virtual ~CNormalHttpComm();

	virtual int	ReqRecv(CReqHttpMsg *reqmsg);
	virtual int	ResSend(CResHttpMsg *resmsg);
	virtual int	ReqSend(CReqHttpMsg *reqmsg);
	virtual int ResRecv(CResHttpMsg *resmsg);

};



#endif